cmake_minimum_required(VERSION 2.6)

project(AspectGameToolkit)

add_subdirectory(AspectEngine)
add_subdirectory(TestEngine)
add_subdirectory(Utilities)
#add_subdirectory(AspectEditor)

#####
# CPack Stuff
#####
INCLUDE(InstallRequiredSystemLibraries)

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Aspect Game Toolkit")
SET(CPACK_PACKAGE_VENDOR "Aspect Foundation")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Licence.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
IF(WIN32 AND NOT UNIX)
  # There is a bug in NSI that does not handle full unix paths properly. Make
  # sure there is at least one set of four (4) backlasshes.
  SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
  SET(CPACK_NSIS_INSTALLED_ICON_NAME "build\\\\TestEngine.exe")
  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} Aspect Game Toolkit")
  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\code.google.com/p/aspect-engine/wiki/Help")
  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\code.google.com/p/aspect-engine/")
  SET(CPACK_NSIS_CONTACT "savspect@googlemail.com")
  SET(CPACK_NSIS_MODIFY_PATH ON)
ELSE(WIN32 AND NOT UNIX)
  SET(CPACK_STRIP_FILES "build/TestEngine/TestEngine")
  SET(CPACK_SOURCE_STRIP_FILES "")
ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_EXECUTABLES "TestEngine")

include(CPack)